package org.zb.object;

import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.geom.Vector2f;


public class PhysicalObject {

	public String id;
	
	public Vector2f position = new Vector2f(0f, 0f);
	public float mass = 1f;
	public float size = 20f;

	public void render(GameContainer gc, Graphics g, int offsetX, int offsetY) throws SlickException {
		g.drawRect(position.x, position.y, size, size);
	}
	
	public void update(GameContainer container, int delta) throws SlickException {
		
	}	
	
	public void init() {
		
	}
	
	@Override
	public String toString() {
		return "[" + this.getClass().getName() + "]: id: " + id + ", position: " + position.toString() + ", size: " + size;
	}

	@Override
	public boolean equals(Object obj) {
		return id.equals(((PhysicalObject)obj).id);
	}
	
	@Override
	public int hashCode() {
		return id.hashCode();
	}
	
}
